/*
 * This Class is only for Class 2 Class. not for human.
 * 
 * use this to check dataFormat.
 * 
 */
package com.cf.core.model.diagram.config {
	import com.cf.core.model.diagram.background.BaseBackground;
	import com.cf.core.model.diagram.constants.*;
	import com.cf.core.model.diagram.data.DataSet;
	import flash.display.DisplayObject;
	import flash.display.DisplayObjectContainer;
	public class param extends Object {
		private var G_background:*;	// any Class base on BaseBackground
		public function set background(_o:*):void {	if (_o is BackgroundSet) G_background = _o;	else G_background = false;}
		public function get background():*{ return G_background; }
		private var G_chart:String;
		public function set chart(_v:String):void{ G_chart=_v; }
		public function get chart():String {return G_chart;};
		private var G_width:Number;
		public function set width(_v:Number):void{ G_width=_v; }
		public function get width():Number { return G_width; }
		private var G_height:Number;
		public function set height(_v:Number):void{ G_height=_v; }
		public function get height():Number { return G_height; }
		private var G_data:DataSet;
		public function dataAdd(_input:Object):void { G_data.add(_input);}
		public function get data():Array{ return G_data.ram}
		public function set dataType(_s:String):void{ G_data.type=_s }
		
		// Config
		private var G_cellSize:Number;
		public function set cellSize(_n:Number):void { G_cellSize = _n }
		public function get cellSize():Number { return G_cellSize }
		
		
		private var G_ready:Boolean;	// after access chart value, G_ready will be true.
		public function get ready():Boolean { return (G_data.type != null); }
		
		public function param():void { RELEASE(); }//fn
		public function RELEASE(e:*=null):void {	
			G_ready = false;
			G_background = new BackgroundSet();
			// G_chartset = ;
			G_width = 100;	// width we wanted to be.
			G_height = 100;	// height we wanted to be.
			G_data = new DataSet();
			G_cellSize = 40;
		}//fn
		public function toString():String {
			var _str:String = "\nParam :\n";
			_str += "Chart : " + String(this.chart) +"\n";
			_str += "Background : " + String(this.background) +"\n";
			_str += "Width : " + String(this.width) +"\n";
			_str += "Height : " + String(this.height) +"\n";
			return _str;
		}//fn
	}//class
}//package